<template>
    <div>
       <h1>医生信息详情显示</h1>
       <table class="table table-bordered">
        <tbody>
            <tr>
                <td align="right">医生名称</td>
                <td>
                    {{ query.doctorName }}
                </td>
            </tr>
            <tr>
                <td align="right">医生图片</td>
                <td>
                    <img :src="query.doctorImg" width="100px" height="140px" v-if="query.doctorImg!=''"/>
                </td>
            </tr>
            <tr>
                <td align="right">科室名称</td>
                <td>
                    {{ query.departmentName }}
                </td>
            </tr>
            <tr>
                <td align="right">学历</td>
                <td>
                    {{ query.edubackground }}
                </td>
            </tr>
            <tr>
                <td align="right">职称</td>
                <td>
                    {{ query.positionName }}
                </td>
            </tr>
            <tr>
                <td align="right">第一职业医院</td>
                <td>
                    {{ query.hospitalName }}
                </td>
            </tr>
            <tr>
                <td align="right">是否开通账号</td>
                <td>
                    {{ query.isNoRome==0?"是":"否" }}
                </td>
            </tr>
        </tbody>
       </table>
    </div>
</template>

<script setup lang="ts">
import axios from 'axios';
import { ref,reactive,onMounted } from 'vue';
import moment from 'moment';
import { useRoute,useRouter } from 'vue-router';
//接收值
const route=useRoute();
//跳转页面
const router=useRouter();

let query:any=reactive
({
  "doctorName": "",
  "doctorImg": "",
  "departmentName": "",
  "edubackground": "",
  "positionName": "",
  "hospitalName": "",
  "isNoRome": 0
})
onMounted(()=>{
    Fan();
})
const Fan=()=>
{
    axios
    ({
        url:'/api/Doctor/DoctorFan',
        method:'get',
        params:
        {
            id:route.query.id
        }
    })
    .then(res=>{
        Object.assign(query,res.data);
    })
    .catch(err=>{

    })
}


</script>

<style scoped>

</style>